
/* self_media_news_aggregator/frontend/css/style.css */
:root {
  --primary-color: #3b82f6;
  --secondary-color: #8b5cf6;
  --text-color: #1f2937;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
}

.dark {
  --primary-color: #60a5fa;
  --secondary-color: #a78bfa;
  --text-color: #f3f4f6;
  --bg-color: #111827;
  --card-bg: #1f2937;
  --border-color: #374151;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s ease;
}

.news-card {
  background-color: var(--card-bg);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-card .content {
  padding: 1.25rem;
}

.news-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.375;
}

.news-card p {
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.news-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-color);
  opacity: 0.7;
}

@media (max-width: 768px) {
  .news-card {
    margin-bottom: 1.5rem;
  }
  
  .news-card img {
    height: 150px;
  }
}

/* 暗黑模式切换按钮 */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 999;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* 标签云动画 */
.tag-cloud span {
  transition: all 0.2s ease;
}

.tag-cloud span:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 加载动画 */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin: 2rem auto;
}
